package com.taxigang.client.uibinder;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.taxigang.client.Session;
import com.taxigang.client.facebook.FacebookApi;
import com.taxigang.client.facebook.FacebookFactory;
import com.taxigang.client.micro.TaxiGangCreator;
import com.taxigang.client.uibinder.TaxiGangPresenter.CreateJoinMode;

public class TaxiGangHome extends Composite  {

	private static TaxiGangHomeUiBinder uiBinder = GWT
			.create(TaxiGangHomeUiBinder.class);

	interface TaxiGangHomeUiBinder extends
			UiBinder<Widget, TaxiGangHome> {
	}

	public TaxiGangHome() {
		initWidget(uiBinder.createAndBindUi(this));
		imgHome.setUrl(MyResources.INSTANCE.imgHome().getSafeUri());
		footer.setUrl(MyResources.INSTANCE.footer().getSafeUri());

		taxiGangText.setText(TaxiGangCreator.taxiGangConstants.welcomeText0());
		taxiGangText1.setText(TaxiGangCreator.taxiGangConstants.welcomeText1());
		taxiGangText2.setText(TaxiGangCreator.taxiGangConstants.welcomeText2());
		taxiGangText3.setText(TaxiGangCreator.taxiGangConstants.welcomeText3());
		taxiGangText4.setText(TaxiGangCreator.taxiGangConstants.welcomeText4());
		taxiGangText5.setText(TaxiGangCreator.taxiGangConstants.welcomeText5());
				
	}

	@UiField
	ShowMeMoreButton showMeMoreButton;
	@UiField
	Label taxiGangText1;
	@UiField
	Label taxiGangText2;
	@UiField
	Label taxiGangText3;
	@UiField
	Label taxiGangText4;
	@UiField
	Label taxiGangText5;
	@UiField
	Label taxiGangText;
	@UiField
	TaxiGangHeader taxiGangHeader;

	@UiField
	Image imgHome;

	@UiField
	Image footer;

	public HasClickHandlers getShowMeMoreButton() {
		return showMeMoreButton.getButton();
	}


//	@UiHandler("showMeMoreButton")
//	void onClick(ClickEvent e) {
//		Window.alert("Hello!");
//	}

//	@UiHandler("feedbackButton")
//	void onClick(ClickEvent e) {
//		Window.alert("Hello!"+e.getSource());
//	}

//	@UiHandler("loginButton")
//	void onClick(ClickEvent e) {
//		Window.alert("Hello!");
//	}

	public void showMenu(){
		taxiGangHeader.showMenu();
	}
	
	

}
